Digital Signature
A digital signature is a cryptographic technique that ensures:
- Authenticity – verifies the sender’s identity
- Integrity – confirms that the message has not been altered
- Non-repudiation – the sender cannot deny sending the message
It is the digital equivalent of a handwritten signature or stamped seal, but much more secure and verifiable through public-key cryptography.
How Digital Signatures Work
Based on Asymmetric (Public Key) Cryptography
Each user has:
- A private key (kept secret)
- A public key (shared with everyone)
Signing Process
- Sender creates a message.
- Computes the hash of the message.
- Encrypts the hash using their private key → digital signature
- Sends the message + signature to the receiver.
Verification Process:
- Receiver receives the message and digital signature.
- Computes the hash of the message.
- Decrypts the signature using sender’s public key.
- If the two hashes match → message is authentic and unchanged.
Uses of Digital Signature
| Feature | Benefit |
|---|---|
| Message Integrity | Detects tampering |
| Authentication | Confirms sender identity |
| Non-repudiation | Prevents sender from denying the message |
| Trust Establishment | Enables secure communication |
Workflow of Digital Signature
+-----------+ +-------------------+ +-------------+
| Client | -- Sign --> | Send Message | --> Verify →| Server |
+-----------+ +-------------------+ +-------------+
| | |
|-- Private Key --(hash & sign)---> -- Public Key -->
| | |
Message + Signature → API Gateway → Validated